home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 January / macformat-020.iso / Shareware City / Developers / OutOfPhase1.01Source / OutOfPhase Folder / SampleSelector.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-01  |  2.4 KB  |  81 lines  |  [TEXT/KAHL]

  1. /* SampleSelector.h */
  2.  
  3. #ifndef Included_SampleSelector_h
  4. #define Included_SampleSelector_h
  5.  
  6. /* SampleSelector module depends on */
  7. /* MiscInfo.h */
  8. /* Audit */
  9. /* Debug */
  10. /* Definitions */
  11. /* Memory */
  12. /* SampleList */
  13. /* WaveTableList */
  14. /* AlgoSampList */
  15. /* AlgoWaveTableList */
  16.  
  17. typedef float SampRangeHzType;
  18.  
  19. struct SampleSelectorRec;
  20. typedef struct SampleSelectorRec SampleSelectorRec;
  21.  
  22. /* types that a sample can be */
  23. typedef enum
  24.     {
  25.         eDataSample EXECUTE(= -4811),
  26.         eAlgoSample,
  27.         eDataWaveTable,
  28.         eAlgoWaveTable
  29.     } SampleSourceTypes;
  30.  
  31. /* forwards */
  32. struct SampleListRec;
  33. struct AlgoSampListRec;
  34. struct WaveTableListRec;
  35. struct AlgoWaveTableListRec;
  36.  
  37. /* create a new sample selector record */
  38. SampleSelectorRec*        NewSampleSelectorList(double LowestBound);
  39.  
  40. /* dispose of a sample selector list */
  41. void                                    DisposeSampleSelectorList(SampleSelectorRec* SampList);
  42.  
  43. /* add a new sample thing, with it's upper bound.  the object becomes the */
  44. /* owner of the name string */
  45. MyBoolean                            AppendSampleSelector(SampleSelectorRec* SampList,
  46.                                                 double UpperBound, char* Name);
  47.  
  48. /* get the number of sample ranges specified in the list */
  49. long                                    GetSampleSelectorListLength(SampleSelectorRec* SampList);
  50.  
  51. /* return the low bound frequency of a particular list entry */
  52. SampRangeHzType                GetSampleListEntryLowFreqBound(SampleSelectorRec* SampList,
  53.                                                 long Index);
  54.  
  55. /* return the high bound frequency of a particular list entry */
  56. SampRangeHzType                GetSampleListEntryHighFreqBound(SampleSelectorRec* SampList,
  57.                                                 long Index);
  58.  
  59. /* get the actual ptr to the sample name */
  60. char*                                    GetSampleListEntryName(SampleSelectorRec* SampList, long Index);
  61.  
  62. /* resolve named references to samples.  returns False if it can't */
  63. MyBoolean                            ResolveSamplesInSampleList(SampleSelectorRec* SampList,
  64.                                                 struct SampleListRec* SampleList,
  65.                                                 struct AlgoSampListRec* AlgoSampList);
  66.  
  67. /* resolve named references to wave tables.  returns False if it can't */
  68. MyBoolean                            ResolveWaveTablesInSampleList(SampleSelectorRec* SampList,
  69.                                                 struct WaveTableListRec* WaveTableList,
  70.                                                 struct AlgoWaveTableListRec* AlgoWaveTableList);
  71.  
  72. /* get the wave type of an entry */
  73. SampleSourceTypes            GetSampleListWaveType(SampleSelectorRec* SampList,
  74.                                                 long Index);
  75.  
  76. /* get a reference to the object */
  77. void*                                    GetSampleListWaveReference(SampleSelectorRec* SampList,
  78.                                                 long Index);
  79.  
  80. #endif
  81.